﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" ng-app="todoApp">
<head>
    <title>Angular App #1</title>
</head>
<body>
    <div ng-controller="HomeController">

        <input type="text" name="name" value="" ng-model="searchString" placeholder="Search" />


        <input type="text" name="name" value="" ng-model="name" placeholder="Name" />
        <input type="text" name="name" value="" ng-model="task" placeholder="A Task"/>
        
        <button ng-show="!editMode" ng-click="doAddTask()">Add</button>
        <button ng-show="editMode" ng-click=" doSaveTask()">Save</button>


        <div ng-repeat="t in myTodos | filter:searchString ">
            <p>{{($index+1) +","+ t.name +","+ t.task}} <button ng-click="doDeleteTask($index)">Delete</button><button ng-click="doEditTask($index)">Edit</button></p>
        </div>
        <hr />
      
    </div>


    <script src="Scripts/angular.js"></script>
    <script src="Scripts/app/app.js"></script>
</body>
</html>
